package com.itheima.service.impl;

import com.itheima.pojo.User;
import com.itheima.service.UserService;

import java.util.List;
import java.util.Map;
import java.util.Set;

public class UserServiceImpl implements UserService {

    //有参构造注入
    private String username;
    private Integer age;

    private String[] address;

    public void setUserList(List<User> userList) {
        this.userList = userList;
    }

    private List<User> userList;

    public void setAddress(String[] address) {
        this.address = address;
    }

    private Map<String, Object> maps;

    public void setMaps(Map<String, Object> maps) {
        this.maps = maps;
    }

    private Set houses;

    public void setHouses(Set houses) {
        this.houses = houses;
    }


    public UserServiceImpl() {
    }

    public UserServiceImpl(String username, Integer age) {
        this.username = username;
        this.age = age;
        System.out.println(username + "===" + age);
    }

    public void setUsername(String username) {
        System.out.println("setUsername run...");
        this.username = username;
    }

    public void setAge(Integer age) {
        System.out.println("setAge run....");
        this.age = age;
    }

    @Override
    public void addUser() {
        System.out.println("addUser run....");
    }

    @Override
    public String toString() {
        return "UserServiceImpl{" +
                "username='" + username + '\'' +
                ", age=" + age +
                '}';
    }
}
